package org.luxor.system.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.luxor.commons.core.utils.BeanUtils;
import org.luxor.system.entity.SysCaptchaEntity;
import org.luxor.system.mapper.SysCaptchaMapper;
import org.luxor.system.service.ISysCaptchaService;
import org.springframework.stereotype.Service;

import java.util.Map;


/**
 * 系统验证码
 *
 * @author Mark @date 2020-12-29 10:27:13
 */
@Service("sysCaptchaService")
public class SysCaptchaServiceImpl extends ServiceImpl<SysCaptchaMapper, SysCaptchaEntity> implements ISysCaptchaService {

    @Override
    public IPage<SysCaptchaEntity> page(IPage<SysCaptchaEntity> page, Map query) {
        SysCaptchaEntity queryEntity = BeanUtils.toObject(SysCaptchaEntity.class, query);
        return super.page(page, Wrappers.query(queryEntity));
    }

}
